import 'package:flutter/material.dart';
import 'package:flutter_base_framework/flutter_base_framework.dart';

class ResConfig extends IResConfig{

  @override
  Widget configLoadEmptyView() {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        ImageView.assets(path: 'assets/images/icon_empty.png', width: 100.dp, height: 100.dp),
        Get.heightBox(10.dp),
        Text('数据为空, 点击重试~')
      ],
    );
  }

  @override
  Widget configLoadErrorView() {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        ImageView.assets(path: 'assets/images/icon_error.png', width: 100.dp, height: 100.dp),
        Get.heightBox(10.dp),
        Text('请求失败, 点击重试~')
      ],
    );
  }

  @override
  Widget configLoadingView() {
    return Center(
      child: CircularProgressIndicator(
        valueColor: AlwaysStoppedAnimation(
          Colors.blue,
        ),
      ),
    );
  }

  @override
  int configInitPageIndex = 0;

  @override
  int configPageSize = 10;

  @override
  String defaultImage = 'assets/images/default_image.png';
}